package IC.Types;

public class MethodType extends Type {

	private Type[] parametersTypeArr;
    private Type methodReturnType;

    public MethodType(Type[] parametersTypeArray, Type returnType, String methodTypeName)
    {
        super(methodTypeName);
        parametersTypeArr = parametersTypeArray;
        methodReturnType = returnType;
    }

    public Type[] getMethodParametersTypeArray() 
    {
        return parametersTypeArr;
    }

    public Type getMethodReturnType() {
        return methodReturnType;
    }
    
    public boolean isRef() {
        return false;
    }

    public boolean isSub(Type ty) {
        return false;
    }

    public String toString() {
        return String.format("%d: Method type: %s", getTypeId(),getTypeName());
    }
}